package com.chr.service.impl;

import com.chr.entity.Order;
import com.chr.mapper.OrderMapper;
import com.chr.service.OrderService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

/**
 * 订单Service实现类
 * @author java1234_小锋
 * @site www.java1234.com
 * @company Java知识分享网
 * @create 2020-06-05 21:42
 */
@Service("orderService")
public class OrderServiceImpl implements OrderService {

    @Autowired
    private OrderMapper orderMapper;

    @Override
    public List<Order> list(Map<String, Object> map) {
        return orderMapper.list(map);
    }

    @Override
    public Long getTotal(Map<String, Object> map) {
        return orderMapper.getTotal(map);
    }

    @Override
    public Order findById(String id) {
        return orderMapper.findById(id);
    }

    @Override
    public Integer add(Order order) {
        return orderMapper.add(order);
    }

    @Override
    public Integer update(Order order) {
        return orderMapper.update(order);
    }

    @Override
    public Integer delete(Integer id) {
        return orderMapper.delete(id);
    }
}
